﻿<metro:MetroWindow
        xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Custom="http://metro.mahapps.com/winfx/xaml/shared"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Name="metroWindow" x:Class="intelliSys.NankaiUtilities.EventSynchronizer.MainWindow"
        Title="NKU Event Live Sync" Height="450" Width="850" Foreground="White" 
        TitleForeground="White" WindowStartupLocation="Manual"  ShowTitleBar="False" ShowMinButton="False" ShowMaxRestoreButton="False" ShowCloseButton="False"
        xmlns:clr="clr-namespace:intelliSys.NankaiUtilities.EventSynchronizer;assembly=NKUEventClassLibrary"
        ShowIconOnTitleBar="False" WindowStyle="None" 
        xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing">
    <metro:MetroWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedSingleRowTabControl.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Red.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
                <ResourceDictionary Source="resources/icons.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <!--<clr:LiveEvents x:Key="eventDesignTime">
                <clr:LiveEvent Description="blah blah blah" Title="abcdehoihoi21eabcdehoihoi21eabcdehoihoi21eabcdehoihoi21eabcdehoihoi21eabcdehoihoi21eabcdehoihoi21e"/>
                <clr:LiveEvent Description="blah blah blah" Title="abcdehoihoi21e"/>
                <clr:LiveEvent Description="blah blah blah" Title="abcdehoihoi21e"/>
                <clr:LiveEvent Description="blah blah blah" Title="abcdehoihoi21e"/>
            </clr:LiveEvents>-->
            <clr:LiveCalendars x:Key="calendarDesignTime">
                <clr:LiveCalendar Description="blah blah blah" Name="abcdehoihoi21eabcdehoihoi21eabcdehoihoi21eabcdehoihoi21eabcdehoihoi21eabcdehoihoi21eabcdehoihoi21e"/>
                <clr:LiveCalendar Description="blah blah blah" Name="abcdehoihoi21e"/>
                <clr:LiveCalendar Description="blah blah blah" Name="abcdehoihoi21e"/>
                <clr:LiveCalendar Description="blah blah blah" Name="abcdehoihoi21e"/>
            </clr:LiveCalendars>
            <Style x:Key="ShineTextBlock" TargetType="{x:Type TextBlock}">
                <Setter Property="Foreground" Value="DarkGray"/>
                <Style.Triggers>
                    <Trigger Property="IsMouseDirectlyOver" Value="True">
                        <Setter Property="Foreground" Value="{DynamicResource BlackBrush}"/>
                    </Trigger>
                </Style.Triggers>
            </Style>
            <Style x:Key="ShineTextBlockReverse" TargetType="{x:Type TextBlock}">
                <Style.Resources>
                    <Storyboard x:Key="Storyboard1">
                        <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="{x:Null}">
                            <EasingColorKeyFrame KeyTime="0" Value="Black"/>
                        </ColorAnimationUsingKeyFrames>
                    </Storyboard>
                    <Storyboard x:Key="Storyboard2">
                        <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="{x:Null}">
                            <EasingColorKeyFrame KeyTime="0" Value="DarkGray"/>
                        </ColorAnimationUsingKeyFrames>
                    </Storyboard>
                </Style.Resources>
                <Setter Property="Foreground" Value="DarkGray"/>
                <Style.Triggers>
                    <Trigger Property="IsMouseDirectlyOver" Value="True">
                        <Trigger.ExitActions>
                            <BeginStoryboard x:Name="Storyboard2_BeginStoryboard" Storyboard="{StaticResource Storyboard2}"/>
                        </Trigger.ExitActions>
                        <Trigger.EnterActions>
                            <BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
                        </Trigger.EnterActions>
                    </Trigger>
                </Style.Triggers>
            </Style>
            <Storyboard x:Key="SuperBusy" RepeatBehavior="Forever">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="operatorGrid">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0">
                        <EasingDoubleKeyFrame.EasingFunction>
                            <CircleEase EasingMode="EaseIn"/>
                        </EasingDoubleKeyFrame.EasingFunction>
                    </EasingDoubleKeyFrame>
                </DoubleAnimationUsingKeyFrames>
                <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="animationGrid">
                    <EasingColorKeyFrame KeyTime="0" Value="#CCD60000"/>
                    <EasingColorKeyFrame KeyTime="0:0:3.439" Value="#CCFF005D"/>
                    <EasingColorKeyFrame KeyTime="0:0:7.485" Value="#FFFF00AF"/>
                    <EasingColorKeyFrame KeyTime="0:0:11.531" Value="#FFFF7500"/>
                    <EasingColorKeyFrame KeyTime="0:0:15.577" Value="#FF938000"/>
                    <EasingColorKeyFrame KeyTime="0:0:17.2" Value="sc#1, 0.162029371, 0.2158605, 0.000303527"/>
                    <EasingColorKeyFrame KeyTime="0:0:19.624" Value="#FF2D9300"/>
                    <EasingColorKeyFrame KeyTime="0:0:23.67" Value="#FF0040DC"/>
                    <EasingColorKeyFrame KeyTime="0:0:27.716" Value="#FF009497"/>
                    <EasingColorKeyFrame KeyTime="0:0:31.762" Value="#FF730097"/>
                    <EasingColorKeyFrame KeyTime="0:0:35.808" Value="#FF970068"/>
                    <EasingColorKeyFrame KeyTime="0:0:39.854" Value="#FFC20050"/>
                    <EasingColorKeyFrame KeyTime="0:0:41" Value="#CCD60000"/>
                </ColorAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="animationGrid">
                    <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Style TargetType="{x:Type TextBlock}" x:Key="defaultTextBlock">
                <Setter Property="Foreground" Value="{DynamicResource BlackColorBrush}"/>
            </Style>
            <DataTemplate x:Key="unselected">
                <StackPanel Orientation="Vertical" Margin="0,10,0,0">
                    <Grid Height="28">
                        <TextBlock Text="{Binding Name}" FontSize="20">
                            <TextBlock.Foreground>
                                <SolidColorBrush Color="{DynamicResource BlackColor}"/>
                            </TextBlock.Foreground>
                        </TextBlock>
                    </Grid>
                    <TextBlock Text="{Binding Description}" Foreground="DarkGray" FontSize="15"/>
                </StackPanel>
            </DataTemplate>
            <DataTemplate x:Key="selected">
                <StackPanel Orientation="Vertical" Margin="0,10,0,0">
                    <Grid Height="28">
                        <TextBlock Text="{Binding Name}" FontSize="20" Foreground="White"/>
                        <Path Fill="White" Data="F1 M 15,21L 22,28L 32.9999,14.0001L 35.9999,17.0001L 22,34L 12.0001,24L 15,21 Z " HorizontalAlignment="Right" VerticalAlignment="Top" Height="18"  Stretch="Fill" Width="18" />
                    </Grid>
                    <TextBlock Text="{Binding Description}"  FontSize="15" Foreground="White"/>
                </StackPanel>
            </DataTemplate>
            <DataTemplate x:Key="selectedEvent">
                <StackPanel Orientation="Vertical" Margin="0,0,0,0">
                    <Grid>
                        <Label>
                            <Hyperlink NavigateUri="{Binding Link}" Click="Hyperlink_Click_1" Foreground="Black">
                                <TextBlock Text="{Binding Title}" FontSize="20" Foreground="Black" />
                            </Hyperlink>
                        </Label>
                    </Grid>
                    <TextBox Text="{Binding Location}"  FontSize="15" Foreground="{DynamicResource AccentColorBrush}" />
                    <TextBox Text="{Binding StartTime}"  FontSize="15" Foreground="{DynamicResource AccentColorBrush}" />
                </StackPanel>
            </DataTemplate>
            <DataTemplate x:Key="unselectedEvent">
                <StackPanel Orientation="Vertical" Margin="0,0,0,0">
                    <Grid>
                        <Label>
                            <Hyperlink NavigateUri="{Binding Link}" Click="Hyperlink_Click_1" Foreground="Black">
                                <TextBlock Text="{Binding Title}" FontSize="20" Foreground="Black" />
                            </Hyperlink>
                        </Label>
                    </Grid>
                    <TextBox Text="{Binding Location}"  FontSize="15" Foreground="DarkGray" />
                    <TextBox Text="{Binding StartTime}"  FontSize="15" Foreground="DarkGray" />
                </StackPanel>
            </DataTemplate>
            <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
                <Setter Property="ContentTemplate" Value="{StaticResource unselected}"/>
                <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
                <Setter Property="FocusVisualStyle" Value="{x:Null}" />
                <Setter Property="Margin" Value="5"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ListBoxItem}">
                            <ControlTemplate.Resources>
                                <Storyboard x:Key="OnMouseLeftButtonDown1">
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Border">
                                        <EasingDoubleKeyFrame KeyTime="0" Value="0.9"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1">
                                            <EasingDoubleKeyFrame.EasingFunction>
                                                <CircleEase EasingMode="EaseOut"/>
                                            </EasingDoubleKeyFrame.EasingFunction>
                                        </EasingDoubleKeyFrame>
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </ControlTemplate.Resources>
                            <Grid x:Name="Border" Height="68" SnapsToDevicePixels="true" RenderTransformOrigin="0.5,0.5">
                                <Grid.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Grid.RenderTransform>
                                <Rectangle VerticalAlignment="Stretch" HorizontalAlignment="Stretch" x:Name="bgRectangle" Margin="0" Stroke="{x:Null}" StrokeThickness="0"/>
                                <ContentPresenter Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ScrollContentPresenter}}" VerticalAlignment="Stretch" HorizontalAlignment="Left" Margin="2"/>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <EventTrigger RoutedEvent="UIElement.MouseRightButtonUp">
                                    <BeginStoryboard Storyboard="{StaticResource OnMouseLeftButtonDown1}"/>
                                </EventTrigger>
                                <Trigger Property="Selector.IsSelected" Value="True">
                                    <Setter Property="Fill" TargetName="bgRectangle" Value="{DynamicResource AccentColorBrush}"/>
                                </Trigger>
                                <MultiTrigger>
                                    <MultiTrigger.Conditions>
                                        <Condition Property="IsMouseOver" Value="True"/>
                                        <Condition Property="Selector.IsSelected" Value="False"/>
                                    </MultiTrigger.Conditions>
                                    <Setter
                        		Property="Fill" TargetName="bgRectangle" Value="{DynamicResource AccentColorBrush}"/>
                                    <Setter
                        		Property="Opacity" TargetName="bgRectangle" Value="0.3"/>
                                </MultiTrigger>
                                <EventTrigger RoutedEvent="UIElement.MouseLeftButtonUp">
                                    <BeginStoryboard Storyboard="{StaticResource OnMouseLeftButtonDown1}"/>
                                </EventTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <Trigger Property="IsSelected" Value="True">
                        <Setter Property="ContentTemplate" Value="{StaticResource selected}"/>
                    </Trigger>
                </Style.Triggers>
            </Style>
            <Style x:Key="ListBoxItemStyle2" TargetType="{x:Type ListBoxItem}">
                <Setter Property="ContentTemplate" Value="{StaticResource unselectedEvent}"/>
                <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
                <Setter Property="FocusVisualStyle" Value="{x:Null}" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ListBoxItem}">
                            <ControlTemplate.Resources>
                                <Storyboard x:Key="OnMouseLeftButtonDown1">
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Border">
                                        <EasingDoubleKeyFrame KeyTime="0" Value="0.9"/>
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1">
                                            <EasingDoubleKeyFrame.EasingFunction>
                                                <CircleEase EasingMode="EaseOut"/>
                                            </EasingDoubleKeyFrame.EasingFunction>
                                        </EasingDoubleKeyFrame>
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </ControlTemplate.Resources>
                            <Grid x:Name="Border"  Margin="0" SnapsToDevicePixels="False"  RenderTransformOrigin="0.5,0.5">
                                <Grid.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Grid.RenderTransform>
                                <ContentPresenter Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ScrollContentPresenter}}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                                <Rectangle x:Name="bgRectangle" Margin="0" Stretch="Fill" StrokeThickness="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                    <Rectangle.Stroke>
                                        <SolidColorBrush Color="Transparent"/>
                                    </Rectangle.Stroke>
                                </Rectangle>
                                <ed:RegularPolygon x:Name="bgTriangle" HorizontalAlignment="Right" Height="33.622" InnerRadius="1" Margin="0,-2,-18,0" PointCount="3" Stretch="Fill" Stroke="{x:Null}" StrokeThickness="0" VerticalAlignment="Top" Width="60.5" RenderTransformOrigin="0.5,0.5">
                                    <ed:RegularPolygon.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform Angle="45"/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </ed:RegularPolygon.RenderTransform>
                                    <ed:RegularPolygon.Fill>
                                        <SolidColorBrush Color="Transparent"/>
                                    </ed:RegularPolygon.Fill>
                                </ed:RegularPolygon>
                                <Path x:Name="path" Fill="Transparent" Data="F1 M 15,21L 22,28L 32.9999,14.0001L 35.9999,17.0001L 22,34L 12.0001,24L 15,21 Z " HorizontalAlignment="Right" VerticalAlignment="Top" Height="18" Margin="0,8,8,0" Stretch="Fill" Width="18" Stroke="Transparent" />
                            </Grid>
                            <ControlTemplate.Triggers>
                                <EventTrigger RoutedEvent="UIElement.MouseRightButtonUp">
                                    <BeginStoryboard Storyboard="{StaticResource OnMouseLeftButtonDown1}"/>
                                </EventTrigger>
                                <Trigger Property="Selector.IsSelected" Value="True">
                                    <Setter Property="Fill"  TargetName="bgTriangle" Value="{DynamicResource AccentColorBrush}"/>
                                    <Setter Property="Stroke" TargetName="bgRectangle" Value="{DynamicResource AccentColorBrush}"/>
                                    <Setter Property="Stroke" TargetName="path" Value="White"/>
                                    <Setter Property="Fill" TargetName="path" Value="White"/>
                                </Trigger>
                                <MultiTrigger>
                                    <MultiTrigger.Conditions>
                                        <Condition Property="IsMouseOver" Value="True"/>
                                        <Condition Property="Selector.IsSelected" Value="False"/>
                                    </MultiTrigger.Conditions>
                                    <Setter
                        		Property="Fill" TargetName="bgRectangle" Value="{DynamicResource AccentColorBrush}"/>
                                    <Setter
                        		Property="Opacity" TargetName="bgRectangle" Value="0.3"/>
                                    <Setter Property="Stroke" TargetName="path" Value="Transparent"/>
                                    <Setter Property="Fill" TargetName="path" Value="Transparent"/>
                                </MultiTrigger>
                                <EventTrigger RoutedEvent="UIElement.MouseLeftButtonUp">
                                    <BeginStoryboard Storyboard="{StaticResource OnMouseLeftButtonDown1}"/>
                                </EventTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <Trigger Property="IsSelected" Value="True">
                        <Setter Property="ContentTemplate" Value="{StaticResource selectedEvent}"/>
                    </Trigger>
                </Style.Triggers>
            </Style>
            <Storyboard x:Key="TransistAway">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"  >
                    <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="TransistIn">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                    <EasingDoubleKeyFrame KeyTime="0" Value="115"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0">
                        <EasingDoubleKeyFrame.EasingFunction>
                            <CubicEase EasingMode="EaseOut"/>
                        </EasingDoubleKeyFrame.EasingFunction>
                    </EasingDoubleKeyFrame>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"  >
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="ExpandHeight">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="metroWindow">
                    <EasingDoubleKeyFrame KeyTime="0:0:1" Value="650">
                        <EasingDoubleKeyFrame.EasingFunction>
                            <CircleEase EasingMode="EaseOut"/>
                        </EasingDoubleKeyFrame.EasingFunction>
                    </EasingDoubleKeyFrame>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="Shrink">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="metroWindow">
                    <EasingDoubleKeyFrame KeyTime="0" Value="650"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:1" Value="450">
                        <EasingDoubleKeyFrame.EasingFunction>
                            <CubicEase EasingMode="EaseIn"/>
                        </EasingDoubleKeyFrame.EasingFunction>
                    </EasingDoubleKeyFrame>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Color x:Key="Gray">#FF4B4B4B</Color>
        </ResourceDictionary>
    </metro:MetroWindow.Resources>
    <Grid x:Name="MainGrid" Margin="0">
        <Grid x:Name="operatorGrid" Margin="0">
            <Button Background="{DynamicResource AccentColorBrush}" Click="next_Click_1" x:Name="next" Content="下一步" HorizontalAlignment="Left" Margin="18,0,0,15.995" BorderThickness="0" Foreground="White" Style="{DynamicResource ButtonStyle1}" FontSize="12" FontWeight="Normal" Width="53" Height="26" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,-0.524">
            </Button>
            <Grid d:IsHidden="True">
                <WebBrowser x:Name="browser" Margin="0"/>
            </Grid>
            <Grid x:Name="guideGrid" Margin="0,55,0,0">
                <Grid x:Name="ControlPanelGrid" Height="307" Visibility="Collapsed" VerticalAlignment="Top">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Grid.RenderTransform>
                    <TextBlock HorizontalAlignment="Left" Height="34" Margin="17,32,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="102" FontSize="24" IsEnabled="False">
                        <TextBlock.Foreground>
                            <SolidColorBrush Color="#FF9D9999"/>
                        </TextBlock.Foreground><Run Language="zh-cn" Text="正在使用"/></TextBlock>
                    <TextBlock Height="20" Margin="18,70,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontFamily="微软雅黑" HorizontalAlignment="Left" Width="293.5" IsEnabled="False">
                        <TextBlock.Foreground>
                            <SolidColorBrush Color="#FF9D9999"/>
                        </TextBlock.Foreground><Run Language="zh-cn" Text="欢迎！我们可以更新您的日历了。您上次在该时间访问"/></TextBlock>
                    <TextBlock x:Name="lastImportDate" Height="20" Margin="0,70,8,0" TextWrapping="Wrap" VerticalAlignment="Top" FontFamily="微软雅黑" HorizontalAlignment="Right" Width="79.667" FontSize="13.333" TextAlignment="Right" Foreground="#FF4B4B4B"><Run Language="zh-cn" Text="----"/></TextBlock>
                    <TextBlock Height="32" Margin="17,8,11,0" TextWrapping="Wrap" VerticalAlignment="Top"><Run Language="zh-cn" Text="在这里，您可以调整属性、查看状态和清理您的令牌。"/></TextBlock>
                    <TextBlock HorizontalAlignment="Left" Height="34" Margin="18,94,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="123" FontSize="24" IsEnabled="False">
                        <TextBlock.Foreground>
                            <SolidColorBrush Color="#FF9D9999"/>
                        </TextBlock.Foreground><Run Language="zh-cn" Text="状态和令牌"/></TextBlock>
                    <Button Background="{DynamicResource AccentColorBrush}" x:Name="purgeToken" Content="清理" HorizontalAlignment="Right" Margin="0,127,8,0" BorderThickness="0" Foreground="White" Style="{DynamicResource ButtonStyle1}" FontSize="12" FontWeight="Normal" Width="53" Height="26" VerticalAlignment="Top" RenderTransformOrigin="0.5,-0.524" BorderBrush="Black" IsEnabled="False">

                    </Button>
                    <TextBlock Margin="18,132,0,141" TextWrapping="Wrap" FontFamily="微软雅黑" HorizontalAlignment="Left" Width="293.5" IsEnabled="False">
                        <TextBlock.Foreground>
                            <SolidColorBrush Color="#FF9D9999"/>
                        </TextBlock.Foreground><Run Language="zh-cn" Text="令牌是用于鉴别您身份的代码。您可以清理它们。通常"/><LineBreak/><Run Language="zh-cn" Text="您无需清理令牌。"/></TextBlock>
                    <TextBlock HorizontalAlignment="Left" Height="34" Margin="15.999,0,0,107" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="123" FontSize="24" IsEnabled="False">
                        <TextBlock.Foreground>
                            <SolidColorBrush Color="#FF9D9999"/>
                        </TextBlock.Foreground><Run Language="zh-cn" Text="日历和通知"/></TextBlock>
                    <TextBlock Height="35" Margin="18,0,0,68" TextWrapping="Wrap" VerticalAlignment="Bottom" FontFamily="微软雅黑" HorizontalAlignment="Left" Width="293.5" d:LayoutOverrides="HorizontalAlignment" IsEnabled="False">
                        <TextBlock.Foreground>
                            <SolidColorBrush Color="#FF9D9999"/>
                        </TextBlock.Foreground><Run Language="zh-cn" Text="您需要让Windows Live Calendar在事件发生前多少分钟向您发送通知？"/></TextBlock>
                    <TextBox TextChanged="remindTime_TextChanged_1" x:Name="remindTime" HorizontalAlignment="Right" Margin="0,0,8,84.666" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="53" TextAlignment="Right" IsEnabled="False">
                        <TextBox.Text>
                            <Binding Path="NotificationBeforeMinutes" Mode="OneWayToSource" NotifyOnValidationError="True">
                            </Binding>
                        </TextBox.Text>
                    </TextBox>
                    <TextBlock HorizontalAlignment="Left" Height="34" Margin="16.333,0,0,31" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="123" FontSize="24" Foreground="#FF4B4B4B"><Run Language="zh-cn" Text="后台服务"/></TextBlock>
                    <TextBlock Height="19" Margin="15.999,0,0,8" TextWrapping="Wrap" VerticalAlignment="Bottom" FontFamily="微软雅黑" Foreground="#FF4B4B4B" HorizontalAlignment="Left" Width="305.501"><Run Language="zh-cn" Text="隐藏程序，但是在收到新内容时进行通知。"/></TextBlock>
                    <Button Click="backgroundServiceSwitch_Click_1" x:Name="backgroundServiceSwitch" IsEnabled="True" Content="隐藏" HorizontalAlignment="Right" Height="26" Margin="0,0,8,6" VerticalAlignment="Bottom" Width="53" Style="{DynamicResource ButtonStyle1}" FontWeight="Normal" FontSize="12" Foreground="White"/>
                    <Grid HorizontalAlignment="Right" Height="87.333" Margin="0,10,0,0" VerticalAlignment="Top" Width="352.833">
                    	<Rectangle Fill="{DynamicResource AccentColorBrush}"/>
                    	<TextBlock Margin="82.833,23,8,23.333" TextWrapping="Wrap" Foreground="White"><Run Language="zh-cn" Text="南开大学事件同步工具Windows Phone版已经发布。前往商场获取。"/></TextBlock>
                    	<Image HorizontalAlignment="Left" Margin="14.833,13,0,10.333" Source="65830.png" Stretch="Fill" Width="64" RenderTransformOrigin="0.422,0.844"/>
                    </Grid>
                </Grid>
                <Grid x:Name="templateForCopy_Copy" Margin="0,0,0,50">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Grid.RenderTransform>
                </Grid>
                <Grid x:Name="templateForCopy" Margin="0,0,0,50">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Grid.RenderTransform>
                </Grid>
                <Grid x:Name="CalendarPickGrid" Margin="0,0,0,50" Visibility="Collapsed">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Grid.RenderTransform>
                    <ListBox SelectionChanged="calendarList_SelectionChanged_1"  ScrollViewer.HorizontalScrollBarVisibility="Hidden" x:Name="calendarList" SelectionMode="Single" Margin="416.5,50.5,17.5,24.5" ItemContainerStyle="{DynamicResource ListBoxItemStyle1}">
                        <!--<ListBox.GroupStyle>
                            <GroupStyle>
                            </GroupStyle>
                        </ListBox.GroupStyle>-->
                    </ListBox>
                    <TextBlock Margin="18.5,8,0,0" TextWrapping="Wrap" FontSize="24" HorizontalAlignment="Left" Width="395" Height="38.5" VerticalAlignment="Top"><Run Language="zh-cn" Text="您要同步哪个日历？"/></TextBlock>
                    <TextBlock Margin="18.5,50.5,0,24.5" TextWrapping="Wrap" HorizontalAlignment="Left" Width="328">
                        <TextBlock.Foreground>
                            <SolidColorBrush Color="{DynamicResource Gray}"/>
                        </TextBlock.Foreground><Run Language="zh-cn" Text="选择您要同步的日历，我们将把讲座信息同步在这个日历中。"/><LineBreak/><Run Language="zh-cn" Text="您可以在您的Windows Live中新增一个日历，用于同步这些讲座信息。"/><LineBreak/><Run Language="zh-cn"/><LineBreak/><Run Language="zh-cn" Text="我们不会收集任何有关您隐私的信息。"/><LineBreak/><Run Language="zh-cn"/><LineBreak/><Run Language="zh-cn" Text="从右方列出的您的日历列表中，选择一项继续。"/></TextBlock>
                    <metro:MetroProgressBar x:Name="calendarProgress" HorizontalAlignment="Right" Margin="0,132.5,17.5,136" VerticalAlignment="Center" Width="394" IsIndeterminate="True">
                        <metro:MetroProgressBar.Foreground>
                            <SolidColorBrush Color="{DynamicResource AccentColor}"/>
                        </metro:MetroProgressBar.Foreground>
                    </metro:MetroProgressBar>
                    <Grid x:Name="calendarLonelyGrid" HorizontalAlignment="Right" Margin="0,56,17.5,24.5" Width="400">
                        <TextBlock x:Name="calendarLonelyInHere" TextWrapping="Wrap" Text="这里很冷清，什么也没有。" FontSize="24" IsHitTestVisible="False" Height="36.5" VerticalAlignment="Top">
                            <TextBlock.Foreground>
                                <SolidColorBrush Color="{DynamicResource Gray}"/>
                            </TextBlock.Foreground>
                        </TextBlock>
                        <Button Background="{DynamicResource AccentColorBrush}" Content="刷新" Click="RefreshCalendar" HorizontalAlignment="Left" Height="27.5" Margin="3,36.5,0,0" VerticalAlignment="Top" Width="57" Style="{DynamicResource ButtonStyle1}" FontWeight="Normal" FontSize="12" Foreground="White"/>
                    </Grid>
                </Grid>
                <Grid x:Name="EventSourcePickGrid" Margin="0,0,0,50" Visibility="Collapsed">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Grid.RenderTransform>
                    <TextBlock Margin="18.5,8,0,0" TextWrapping="Wrap" FontSize="24" HorizontalAlignment="Left" Width="395" Height="38.5" VerticalAlignment="Top"><Run Language="zh-cn" Text="您要同步来自哪些源的事件？"/></TextBlock>
                    <TextBlock Margin="18.5,50.5,0,24.5" TextWrapping="Wrap" HorizontalAlignment="Left" Width="328">
                        <TextBlock.Foreground>
                            <SolidColorBrush Color="{DynamicResource Gray}"/>
                        </TextBlock.Foreground><Run Language="zh-cn" Text="选择您要同步的事件源。事件源可以是学院或者社团。"/><LineBreak/><Run Language="zh-cn"/><LineBreak/><Run Language="zh-cn" Text="使用CTRL+鼠标左键选取一个或多个事件源，我们将把这些事件同步。"/></TextBlock>
                    <ListBox SelectionChanged="calendarList_SelectionChanged_1"  ScrollViewer.HorizontalScrollBarVisibility="Hidden" x:Name="eventSourceList" SelectionMode="Extended" Margin="416.5,50.5,17.5,24.5" ItemContainerStyle="{DynamicResource ListBoxItemStyle1}">
                    </ListBox>
                </Grid>
                <Grid x:Name="EventPickGrid" Margin="0,0,0,50" Visibility="Collapsed">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Grid.RenderTransform>
                    <ListBox  SelectionChanged="calendarList_SelectionChanged_1"  ScrollViewer.HorizontalScrollBarVisibility="Hidden" x:Name="eventList" SelectionMode="Multiple" Margin="416.5,50.5,17.5,24.5" ItemContainerStyle="{DynamicResource ListBoxItemStyle2}">
                    </ListBox>
                    <TextBlock Margin="18.5,8,0,0" TextWrapping="Wrap" FontSize="24" HorizontalAlignment="Left" Width="395" Height="38.5" VerticalAlignment="Top"><Run Language="zh-cn" Text="您要同步哪些事件？"/></TextBlock>
                    <TextBlock Margin="18.5,50.5,0,0" TextWrapping="Wrap" HorizontalAlignment="Left" Width="328" Height="103" VerticalAlignment="Top">
                        <TextBlock.Foreground>
                            <SolidColorBrush Color="{DynamicResource Gray}"/>
                        </TextBlock.Foreground><Run Language="zh-cn" Text="选择您要同步的事件，我们将把这些事件同步到您之前选取的日历里。"/><LineBreak/><Run Language="zh-cn"/><LineBreak/><Run Language="zh-cn" Text="从右方列出的您的事件列表中，选择一些继续。你可以修改这些事件的属性。"/></TextBlock>
                    <metro:MetroProgressBar x:Name="eventProgress" HorizontalAlignment="Right" Margin="0,132.5,17.5,136" VerticalAlignment="Center" Width="394" IsIndeterminate="True">
                        <metro:MetroProgressBar.Foreground>
                            <SolidColorBrush Color="{DynamicResource AccentColor}"/>
                        </metro:MetroProgressBar.Foreground>
                    </metro:MetroProgressBar>
                    <Grid x:Name="eventLonelyGrid" HorizontalAlignment="Right" Margin="0,56,17.5,24.5" Width="400" Visibility="Collapsed">
                        <TextBlock x:Name="eventLonelyInHere" TextWrapping="Wrap" Text="这里很冷清，什么也没有。" FontSize="24" IsHitTestVisible="False" Height="36.5" VerticalAlignment="Top">
                            <TextBlock.Foreground>
                                <SolidColorBrush Color="{DynamicResource Gray}"/>
                            </TextBlock.Foreground>
                        </TextBlock>
                        <Button Background="{DynamicResource AccentColorBrush}" Content="重试" Click="RefreshEvent"  HorizontalAlignment="Left" Height="27.5" Margin="3,36.5,0,0" VerticalAlignment="Top" Width="57" Style="{DynamicResource ButtonStyle1}" FontWeight="Normal" FontSize="12" Foreground="White"/>
                    </Grid>
                    <StackPanel x:Name="eventShowWhenDone" HorizontalAlignment="Left" Height="348.5" Margin="18,172.5,0,0" VerticalAlignment="Top" Width="395.5" Visibility="Collapsed" >
                        <Grid Height="163.5" Margin="0.5,0,0,0">
                            <TextBlock TextWrapping="Wrap" FontSize="24" Height="38.5" VerticalAlignment="Top"><Run Language="zh-cn" Text="筛除选项"/></TextBlock>
                            <metro:ToggleSwitchButton Click="dateFilter_Click_1"  x:Name="dateFilter" Content="ToggleSwitchButton" HorizontalAlignment="Right" Margin="0,0,65.998,0" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" IsChecked="True"/>
                            <TextBlock Margin="0.5,0,156,2" TextWrapping="Wrap" Height="23" VerticalAlignment="Bottom" FontSize="16">
                                <TextBlock.Foreground>
                                    <SolidColorBrush Color="{DynamicResource Gray}"/>
                                </TextBlock.Foreground><Run Language="zh-cn" Text="日期筛选"/></TextBlock>
                            <TextBlock Margin="0.5,38.5,66.5,71" TextWrapping="Wrap">
                                <TextBlock.Foreground>
                                    <SolidColorBrush Color="{DynamicResource Gray}"/>
                                </TextBlock.Foreground><Run Language="zh-cn" Text="我们已经为您筛除了那些发生过的事件和已经同步的事件。要显示所有事件，可以推动下面的扳手以关闭自动筛除已经发生的事件功能。"/></TextBlock>
                            <metro:ToggleSwitchButton Click="syncedFilter_Click_1"  x:Name="syncedFilter" Content="ToggleSwitchButton" HorizontalAlignment="Right" Margin="0,0,65.998,44" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" IsChecked="True"/>
                            <TextBlock Margin="0.5,0,156,44" TextWrapping="Wrap" Height="23" VerticalAlignment="Bottom" FontSize="16">
                                <TextBlock.Foreground>
                                    <SolidColorBrush Color="{DynamicResource Gray}"/>
                                </TextBlock.Foreground><Run Language="zh-cn" Text="隐藏已同步的事件"/></TextBlock>
                        </Grid>
                        <Grid x:Name="eventShowOnException" Margin="0,5,65.998,5" Height="120.25" VerticalAlignment="Top">
                            <TextBlock x:Name="possiblyIncorrect" Margin="0,0,1.002,49" TextWrapping="Wrap">
                                <TextBlock.Foreground>
                                    <SolidColorBrush Color="{DynamicResource AccentColor}"/>
                                </TextBlock.Foreground><Run Language="zh-cn" Text="我们查询了所有事件，但是有一些事件的信息我们无法获取。有时，这是因为事件的描述不规范或者我们发现在同一页面上有多个报告。我们筛除了那些有异常情况的事件。您可以推动下面的扳手关闭这项功能。"/></TextBlock>
                            <metro:ToggleSwitchButton Click="exceptionFilter_Click_1"  x:Name="exceptionFilter" Content="ToggleSwitchButton" HorizontalAlignment="Right" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" IsChecked="True"/>
                            <TextBlock Margin="0,0,91.002,4" TextWrapping="Wrap" Height="23" VerticalAlignment="Bottom" FontSize="16">
                                <TextBlock.Foreground>
                                    <SolidColorBrush Color="{DynamicResource Gray}"/>
                                </TextBlock.Foreground><Run Language="zh-cn" Text="异常筛选"/></TextBlock>
                        </Grid>
                        <Grid Height="49" Margin="1,0,66.5,0">
                            <Button Click="refreshEventStatus_Click_1" x:Name="refreshEventStatus" Content="刷新" HorizontalAlignment="Right" Margin="0,0,0,-3" BorderThickness="0" Foreground="White" Style="{DynamicResource ButtonStyle1}" FontSize="12" FontWeight="Normal" Width="53" RenderTransformOrigin="0.5,-0.524" Height="26" VerticalAlignment="Bottom">
                                <Button.Background>
                                    <SolidColorBrush Color="{DynamicResource AccentColor}"/>
                                </Button.Background>
                            </Button>
                            <TextBlock Margin="0,0,89.5,0" TextWrapping="Wrap" Height="23" FontSize="16" VerticalAlignment="Bottom">
                                <TextBlock.Foreground>
                                    <SolidColorBrush Color="{DynamicResource Gray}"/>
                                </TextBlock.Foreground><Run Language="zh-cn" Text="刷新状态"/></TextBlock>
                        </Grid>
                    </StackPanel>
                </Grid>
                <Grid x:Name="DoneGrid" Margin="0,0,0,50" Visibility="Collapsed">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Grid.RenderTransform>
                    <TextBlock HorizontalAlignment="Left" Height="36.833" Margin="19.332,8,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="297.5" FontSize="24"><Run Language="zh-cn" Text="好！我们的工作已完成。"/></TextBlock>
                    <TextBlock x:Name="succeededEvents" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Hidden" HorizontalAlignment="Left" Margin="19.332,104.833,0,25" TextWrapping="Wrap" Width="297.5"/>
                    <TextBlock x:Name="syncedEvents" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Hidden" HorizontalAlignment="Left" Margin="19.332,44.833,0,0" TextWrapping="Wrap" Width="297.5" Height="56" VerticalAlignment="Top">
                        <TextBlock.Foreground>
                            <SolidColorBrush Color="{DynamicResource Gray}"/>
                        </TextBlock.Foreground><Run Language="zh-cn" Text="下面的事件已经与您选择的日历同步。您可以在下方查看它们。找不到某些事件？它们的同步可能已经失败，您可以再试一次，或者手动添加它们。"/></TextBlock>
                </Grid>
            </Grid>
            <Grid Height="40" Margin="0" VerticalAlignment="Top">
                <Grid.Background>
                    <SolidColorBrush Color="{DynamicResource AccentColor}"/>
                </Grid.Background>
                <TextBlock x:Name="banner" Margin="18.666,8,0,8" TextWrapping="Wrap" Foreground="White" FontSize="20" HorizontalAlignment="Left" Width="179.334" VerticalAlignment="Center"><Run Language="zh-cn" Text="控制面板..."/></TextBlock>
                <Grid MouseLeftButtonDown="userInfoGrid_MouseLeftButtonDown_1"  x:Name="userInfoGrid" HorizontalAlignment="Right" Width="114.037" Background="#000E0505" Margin="0,0,8,0" Style="{DynamicResource GridStyle1}">
                    <TextBlock IsHitTestVisible="False" x:Name="userName" Margin="10,10,0,10" TextWrapping="Wrap" FontSize="13.333" TextAlignment="Center" FontFamily="Segoe UI Light" Foreground="White" HorizontalAlignment="Left" d:LayoutOverrides="Height"><Run Language="zh-cn" Text="Liang Luo"/></TextBlock>
                    <Rectangle IsHitTestVisible="False" Fill="White" HorizontalAlignment="Right" Margin="0,0,10,0" Stroke="Black" Width="30" Height="30" StrokeThickness="0" VerticalAlignment="Center"/>
                    <Image IsHitTestVisible="False" x:Name="userImage" Margin="0,0,10,0" Width="30" Height="30" HorizontalAlignment="Right"/>
                </Grid>
            </Grid>
        </Grid>
        <Grid IsHitTestVisible="False" x:Name="animationGrid" Margin="0" Background="#CCFF0000" Opacity="0" d:IsHidden="True">
            <metro:ProgressRing x:Name="superBusyRing" IsActive="True" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" Width="50" Height="50" RenderTransformOrigin="0.5,0.5" IsLarge="False">
                <metro:ProgressRing.Foreground>
                    <SolidColorBrush Color="{StaticResource WhiteColor}"/>
                </metro:ProgressRing.Foreground>
            </metro:ProgressRing>
            <metro:TransitioningContentControl x:Name="transitioning1" Content="TransitioningContentControl" Height="26" Margin="0,0,0,75" VerticalAlignment="Bottom" HorizontalAlignment="Center" FontFamily="Segoe UI Light"/>
            <metro:TransitioningContentControl x:Name="transitioningPerecentage" Content="16%" Height="38" Margin="0,0,0,116" VerticalAlignment="Bottom" HorizontalAlignment="Center" FontSize="29.333" FontFamily="Segoe UI Light" Visibility="Collapsed"/>
        </Grid>
    </Grid>

</metro:MetroWindow>
